window.onload = function() {
	seajs.use(['jquery-1.8.2.js', 'iscroll_module.js', 'mdialog_module.js', 'util_module.js'], function(Z, I, M, U) {
		U.fillHead();
		U.fillFooter();
		var id = U.getParam('id');
		initPage();

		function initPage() { //初始化页面
			U.loadOpt(false);
			initEvent();
		}

		function initEvent() {
			U.ajaxget('/support/detail/' + id, {}, function(json) {
				var result = json.models.supportRecordVO;
				var type = result.payType;
				if(type == 1) {
					type = '支付宝'
				} else if(type == 2) {
					type = '微信'
				} else {
					type = '银联'
				}
				var state = result.state;
				if(state == 1) {
					state == '待支付';
				} else if(state == 2) {
					state == '支付不成功';
				} else {
					state == '待支成功';
				}
				if(result.title == null||result.title == "null") {
					result.title ='众筹捐款详情';
				}
				$('.title').text(result.title)
				$('.money_amount').text('￥'+result.amount);
				$('.name').text(result.username);
				$('.cannect').text(result.deliveryVO.mobile);
				$('.cannect_address').text(result.deliveryVO.address);
				$('.pay_type').text(type);
				$('.message').text(result.message);
				$('.mun_record').text(result.paySign);
				$('.pay_time').text(U.getMyDate(result.gmtCreate));
			});

		}
	});
}